﻿using SudukuSolver_Mvvm.Models;
using SudukuSolver_Mvvm.ViewModels;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace SudukuSolver_Mvvm.ValueConverters
{
    public class SolveStateToText : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is SolveState state)
            {
                switch (state)
                {
                    case SolveState.Stop:
                        return "开始";
                    case SolveState.Solving:
                        return "暂停";
                    case SolveState.Pause:
                        return "继续";
                    default:
                        break;
                }
            }
            return "";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
